home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssccccaaaalllleeee((((3333TTTTkkkk)))) ssssccccaaaalllleeee((((3333TTTTkkkk))))
-
-
-
- NNNNAAAAMMMMEEEE
- scale - Create and manipulate scale widgets
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ssssccccaaaalllleeee _p_a_t_h_N_a_m_e ?_o_p_t_i_o_n_s?
-
- SSSSTTTTAAAANNNNDDDDAAAARRRRDDDD OOOOPPPPTTTTIIIIOOOONNNNSSSS
- aaaaccccttttiiiivvvveeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd ffffoooonnnntttt hhhhiiiigggghhhhlllliiiigggghhhhttttTTTThhhhiiiicccckkkknnnneeeessssssss rrrreeeeppppeeeeaaaattttIIIInnnntttteeeerrrrvvvvaaaallll|
- bbbbaaaacccckkkkggggrrrroooouuuunnnndddd ffffoooorrrreeeeggggrrrroooouuuunnnndddd oooorrrriiiieeeennnntttt ttttaaaakkkkeeeeFFFFooooccccuuuussss |
- bbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh hhhhiiiigggghhhhlllliiiigggghhhhttttBBBBaaaacccckkkkggggrrrroooouuuunnnndddd rrrreeeelllliiiieeeeffff ttttrrrroooouuuugggghhhhCCCCoooolllloooorrrr |
- ccccuuuurrrrssssoooorrrr hhhhiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr rrrreeeeppppeeeeaaaattttDDDDeeeellllaaaayyyy
-
- See the ``options'' manual entry for details on the standard options.
-
- WWWWIIIIDDDDGGGGEEEETTTT----SSSSPPPPEEEECCCCIIIIFFFFIIIICCCC OOOOPPPPTTTTIIIIOOOONNNNSSSS
- Name: bbbbiiiiggggIIIInnnnccccrrrreeeemmmmeeeennnntttt
- Class: BBBBiiiiggggIIIInnnnccccrrrreeeemmmmeeeennnntttt
- Command-Line Switch:----bbbbiiiiggggiiiinnnnccccrrrreeeemmmmeeeennnntttt
-
- Some interactions with the scale cause its value to change by |
- ``large'' increments; this option specifies the size of the large |
- increments. If specified as 0, the large increments default to 1/10|
- the range of the scale.
-
- Name: ccccoooommmmmmmmaaaannnndddd
- Class: CCCCoooommmmmmmmaaaannnndddd
- Command-Line Switch:----ccccoooommmmmmmmaaaannnndddd
-
- Specifies the prefix of a Tcl command to invoke whenever the scale's|
- value is changed via a widget command. The actual command consists
- of this option followed by a space and a real number indicating the
- new value of the scale.
-
- Name: ddddiiiiggggiiiittttssss
- Class: DDDDiiiiggggiiiittttssss
- Command-Line Switch:----ddddiiiiggggiiiittttssss
-
- An integer specifying how many significant digits should be retained|
- when converting the value of the scale to a string. If the number |
- is less than or equal to zero, then the scale picks the smallest |
- value that guarantees that every possible slider position prints as |
- a different string.
-
- Name: ffffrrrroooommmm
- Class: FFFFrrrroooommmm
- Command-Line Switch:----ffffrrrroooommmm
-
- A real value corresponding to the left or top end of the scale.
-
- Name: llllaaaabbbbeeeellll
- Class: LLLLaaaabbbbeeeellll
- Command-Line Switch:----llllaaaabbbbeeeellll
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssccccaaaalllleeee((((3333TTTTkkkk)))) ssssccccaaaalllleeee((((3333TTTTkkkk))))
-
-
-
- A string to display as a label for the scale. For vertical scales
- the label is displayed just to the right of the top end of the
- scale. For horizontal scales the label is displayed just above the
- left end of the scale. If the option is specified as an empty
- string, no label is displayed.
-
- Name: lllleeeennnnggggtttthhhh
- Class: LLLLeeeennnnggggtttthhhh
- Command-Line Switch:----lllleeeennnnggggtttthhhh
-
- Specifies the desired long dimension of the scale in screen units
- (i.e. any of the forms acceptable to TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss). For vertical
- scales this is the scale's height; for horizontal scales it is the
- scale's width.
-
- Name: rrrreeeessssoooolllluuuuttttiiiioooonnnn |
- Class: RRRReeeessssoooolllluuuuttttiiiioooonnnn |
- Command-Line Switch:----rrrreeeessssoooolllluuuuttttiiiioooonnnn |
-
- A real value specifying the resolution for the scale. If this value|
- is greater than zero then the scale's value will always be rounded |
- to an even multiple of this value, as will tick marks and the |
- endpoints of the scale. If the value is less than zero then no |
- rounding occurs. Defaults to 1 (i.e., the value will be integral).
-
- Name: sssshhhhoooowwwwVVVVaaaalllluuuueeee
- Class: SSSShhhhoooowwwwVVVVaaaalllluuuueeee
- Command-Line Switch:----sssshhhhoooowwwwvvvvaaaalllluuuueeee
-
- Specifies a boolean value indicating whether or not the current
- value of the scale is to be displayed.
-
- Name: sssslllliiiiddddeeeerrrrLLLLeeeennnnggggtttthhhh
- Class: SSSSlllliiiiddddeeeerrrrLLLLeeeennnnggggtttthhhh
- Command-Line Switch:----sssslllliiiiddddeeeerrrrlllleeeennnnggggtttthhhh
-
- Specfies the size of the slider, measured in screen units along the
- slider's long dimension. The value may be specified in any of the
- forms acceptable to TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss.
-
- Name: ssssttttaaaatttteeee
- Class: SSSSttttaaaatttteeee
- Command-Line Switch:----ssssttttaaaatttteeee
-
- Specifies one of three states for the scale: nnnnoooorrrrmmmmaaaallll, aaaaccccttttiiiivvvveeee, or |
- ddddiiiissssaaaabbbblllleeeedddd. If the scale is disabled then the value may not be |
- changed and the scale won't activate. If the scale is active, the |
- slider is displayed using the color specified by the |
- aaaaccccttttiiiivvvveeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd option.
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ssssccccaaaalllleeee((((3333TTTTkkkk)))) ssssccccaaaalllleeee((((3333TTTTkkkk))))
-
-
-
- Name: ttttiiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll
- Class: TTTTiiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll
- Command-Line Switch:----ttttiiiicccckkkkiiiinnnntttteeeerrrrvvvvaaaallll
-
- Must be a real value. Determines the spacing between numerical tick
- marks displayed below or to the left of the slider. If 0, no tick
- marks will be displayed.
-
- Name: ttttoooo
- Class: TTTToooo
- Command-Line Switch:----ttttoooo
-
- Specifies a real value corresponding to the right or bottom end of
- the scale. This value may be either less than or greater than the
- ffffrrrroooommmm option.
-
- Name: vvvvaaaarrrriiiiaaaabbbblllleeee
- Class: VVVVaaaarrrriiiiaaaabbbblllleeee
- Command-Line Switch:----vvvvaaaarrrriiiiaaaabbbblllleeee
-
- Specifies the name of a global variable to link to the scale.
- Whenever the value of the variable changes, the scale will upate to
- reflect this value. Whenever the scale is manipulated
- interactively, the variable will be modified to reflect the scale's
- new value.
-
- Name: wwwwiiiiddddtttthhhh
- Class: WWWWiiiiddddtttthhhh
- Command-Line Switch:----wwwwiiiiddddtttthhhh
-
- Specifies the desired narrow dimension of the trough in screen units
- (i.e. any of the forms acceptable to TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss). For vertical
- scales this is the trough's width; for horizontal scales this is
- the trough's height.
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The ssssccccaaaalllleeee command creates a new window (given by the _p_a_t_h_N_a_m_e argument)
- and makes it into a scale widget. Additional options, described above,
- may be specified on the command line or in the option database to
- configure aspects of the scale such as its colors, orientation, and
- relief. The ssssccccaaaalllleeee command returns its _p_a_t_h_N_a_m_e argument. At the time
- this command is invoked, there must not exist a window named _p_a_t_h_N_a_m_e,
- but _p_a_t_h_N_a_m_e's parent must exist.
-
- A scale is a widget that displays a rectangular _t_r_o_u_g_h and a small
- _s_l_i_d_e_r. The trough corresponds to a range of real values (determined by
- the ffffrrrroooommmm, ttttoooo, and rrrreeeessssoooolllluuuuttttiiiioooonnnn options), and the position of the slider
- selects a particular real value. The slider's position (and hence the
- scale's value) may be adjusted with the mouse or keyboard as described in|
- the BINDINGS section below. Whenever the scale's value is changed, a Tcl
- command is invoked (using the ccccoooommmmmmmmaaaannnndddd option) to notify other interested
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- ssssccccaaaalllleeee((((3333TTTTkkkk)))) ssssccccaaaalllleeee((((3333TTTTkkkk))))
-
-
-
- widgets of the change. In addition, the value of the scale can be linked
- to a Tcl variable (using the vvvvaaaarrrriiiiaaaabbbblllleeee option), so that changes in either
- are reflected in the other.
-
- Three annotations may be displayed in a scale widget: a label appearing
- at the top right of the widget (top left for horizontal scales), a number
- displayed just to the left of the slider (just above the slider for
- horizontal scales), and a collection of numerical tick marks just to the
- left of the current value (just below the trough for horizontal scales).
- Each of these three annotations may be enabled or disabled using the
- configuration options.
-
-
- WWWWIIIIDDDDGGGGEEEETTTT CCCCOOOOMMMMMMMMAAAANNNNDDDD
- The ssssccccaaaalllleeee command creates a new Tcl command whose name is _p_a_t_h_N_a_m_e. This
- command may be used to invoke various operations on the widget. It has
- the following general form:
-
- _p_a_t_h_N_a_m_e _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
-
- _O_p_t_i_o_n and the _a_r_gs determine the exact behavior of the command. The
- following commands are possible for scale widgets:
-
- _p_a_t_h_N_a_m_e ccccggggeeeetttt _o_p_t_i_o_n
- Returns the current value of the configuration option given by |
- _o_p_t_i_o_n. _O_p_t_i_o_n may have any of the values accepted by the ssssccccaaaalllleeee |
- command.
-
- _p_a_t_h_N_a_m_e ccccoooonnnnffffiiiigggguuuurrrreeee ?_o_p_t_i_o_n? ?_v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
- Query or modify the configuration options of the widget. If no
- _o_p_t_i_o_n is specified, returns a list describing all of the available
- options for _p_a_t_h_N_a_m_e (see TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the
- format of this list). If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then
- the command returns a list describing the one named option (this
- list will be identical to the corresponding sublist of the value
- returned if no _o_p_t_i_o_n is specified). If one or more _o_p_t_i_o_n-_v_a_l_u_e
- pairs are specified, then the command modifies the given widget
- option(s) to have the given value(s); in this case the command
- returns an empty string. _O_p_t_i_o_n may have any of the values accepted
- by the ssssccccaaaalllleeee command.
-
- _p_a_t_h_N_a_m_e ccccoooooooorrrrddddssss ?_v_a_l_u_e?
- Returns a list whose elements are the x and y coordinates of the |
- point along the centerline of the trough that corresponds to _v_a_l_u_e. |
- If _v_a_l_u_e is omitted then the scale's current value is used.
-
- _p_a_t_h_N_a_m_e ggggeeeetttt ?_x _y?
- If _x and _y are omitted, returns the current value of the scale. If |
- _x and _y are specified, they give pixel coordinates within the |
- widget; the command returns the scale value corresponding to the |
- given pixel. Only one of _x or _y is used: for horizontal scales _y |
- is ignored, and for vertical scales _x is ignored.
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- ssssccccaaaalllleeee((((3333TTTTkkkk)))) ssssccccaaaalllleeee((((3333TTTTkkkk))))
-
-
-
- _p_a_t_h_N_a_m_e iiiiddddeeeennnnttttiiiiffffyyyy _x _y
- Returns a string indicating what part of the scale lies under the |
- coordinates given by _x and _y. A return value of sssslllliiiiddddeeeerrrr means that |
- the point is over the slider; ttttrrrroooouuuugggghhhh1111 means that the point is over |
- the portion of the slider above or to the left of the slider; and |
- ttttrrrroooouuuugggghhhh2222 means that the point is over the portion of the slider below|
- or to the right of the slider. If the point isn't over one of these|
- elements, an empty string is returned.
-
- _p_a_t_h_N_a_m_e sssseeeetttt _v_a_l_u_e
- This command is invoked to change the current value of the scale,
- and hence the position at which the slider is displayed. _V_a_l_u_e
- gives the new value for the scale. The command has no effect if the
- scale is disabled.
-
-
- BBBBIIIINNNNDDDDIIIINNNNGGGGSSSS
- Tk automatically creates class bindings for scales that give them the
- following default behavior. Where the behavior is different for vertical
- and horizontal scales, the horizontal behavior is described in
- parentheses.
-
- [1] If button 1 is pressed in the trough, the scale's value will be |
- incremented or decremented by the value of the rrrreeeessssoooolllluuuuttttiiiioooonnnn option so |
- that the slider moves in the direction of the cursor. If the button |
- is held down, the action auto-repeats.
-
- [2] If button 1 is pressed over the slider, the slider can be dragged
- with the mouse.
-
- [3] If button 1 is pressed in the trough with the Control key down, the
- slider moves all the way to the end of its range, in the direction
- towards the mouse cursor.
-
- [4] The Up and Left keys move the slider up (left) by the value of the
- rrrreeeessssoooolllluuuuttttiiiioooonnnn option.
-
- [5] The Down and Right keys move the slider down (right) by the value of
- the rrrreeeessssoooolllluuuuttttiiiioooonnnn option.
-
- [6] Control-Up and Control-Left move the slider up (left) by the value
- of the bbbbiiiiggggIIIInnnnccccrrrreeeemmmmeeeennnntttt option.
-
- [7] Control-Down and Control-Right move the slider down (right) by the
- value of the bbbbiiiiggggIIIInnnnccccrrrreeeemmmmeeeennnntttt option.
-
- [8] Home moves the slider to the top (left) end of its range.
-
- [9] End moves the slider to the bottom (right) end of its range.
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- ssssccccaaaalllleeee((((3333TTTTkkkk)))) ssssccccaaaalllleeee((((3333TTTTkkkk))))
-
-
-
- If the scale is disabled using the ssssttttaaaatttteeee option then none of the above
- bindings have any effect.
-
- The behavior of scales can be changed by defining new bindings for
- individual widgets or by redefining the class bindings.
-
-
- KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
- scale, slider, trough, widget
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-